

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'scap_Devices_UpdateStatus') AND type in (N'P', N'PC'))
	DROP PROCEDURE scap_Devices_UpdateStatus
GO

CREATE PROCEDURE scap_Devices_UpdateStatus
	 @DeviceId INT
	,@ConnectionStatus INT
AS
BEGIN
	
	UPDATE scap_Devices 
	SET 
		 ConnectionStatus=@ConnectionStatus 
		,DateStatusUpdate=GETDATE()
	WHERE Id=@DeviceId	
		
END
GO


